package com.wyix.entity;

/**
 * @author wangdx
 * @since 2025/8/1
 */
// 冰箱：实现自己的开机、关机、调节逻辑
public class Refrigerator extends Appliance {
    public Refrigerator(String name) {
        super(name);
    }

    @Override
    public void powerOn() {
        System.out.println(name + "开机：启动制冷系统，默认冷藏4℃");
    }

    @Override
    public void powerOff() {
        System.out.println(name + "关机：关闭制冷，进入节能模式");
    }

    // 调节参数：切换制冷模式（参数为模式名称）
    @Override
    public void adjust(String mode) {
        System.out.println(name + "调节：切换到【" + mode + "】模式");
    }
}
